/**
 * 所有跟企业相关的接口
 */
import { ApiResponse, HttpListResp } from '@/types/http.d';
import { default as axios } from '@/utils/request';
/**
 * 企业相关接口
 */
class CompanyService {
  // 获取热门企业
  static getHotCompany<T = any>() {
    return axios<ApiResponse<T>>({
      url: `/seeker-web/v1/getHotCompany`,
      method: 'get',
    });
  }

  // 企业详情
  static getCompanyDetail<T = any>(params: any) {
    return axios<ApiResponse<T>>({
      url: `/seeker-web/v1/getCompanyDetail/${params.companyId}`,
      method: 'get',
      params: { isHotCompany: params.isHotCompany },
    });
  }

  // 校园招聘信息
  static getSchoolEmployment<T = any>() {
    return axios<ApiResponse<T>>({
      url: `/seeker-web/v1/getSchoolEmployment`,
      method: 'get',
    });
  }

  // 退伍军人招聘信息
  static getSoldierEmployment<T = any>() {
    return axios<ApiResponse<T>>({
      url: `/seeker-web/v1/getSoldierEmployment`,
      method: 'get',
    });
  }

  // 企业在招职位列表
  static getCompanyJob<T = any>(params: any) {
    return axios<ApiResponse<T>>({
      url: `/seeker-web/v1/getCompanyJob`,
      method: 'get',
      params,
    });
  }

  //热门企业-更多
  static searchCompanyList<T = any>(params: any) {
    return axios<ApiResponse<HttpListResp<T>>>({
      url: '/seeker-web/v1/searchCompanyList',
      method: 'get',
      params,
    });
  }

  // 热招职位-更多
  static selectHrJobList<T = any>(params: any) {
    return axios<ApiResponse<HttpListResp<T>>>({
      // url: '/seeker-web/v1/selectHrJobList',
      url: '/seeker-web/v1/job/page',
      method: 'get',
      params,
    });
  }
}

export default CompanyService;
